//公司职位
import React, { Component } from 'react';
import {
    View,
} from 'react-native';

import { companytwoStyle as styles } from '../../../../../styles';
import ScrollableTabView, { DefaultTabBar, ScrollableTabBar } from 'react-native-scrollable-tab-view';
import Positionc from './positionc';
import Companythree from './companythree';

var Dimensions = require('Dimensions');
var width = Dimensions.get('window').width;


export default class Companytwo extends Component {
    constructor(props) {            //构造器只执行一次
        super(props);
    };
    render() {
        return (
            <View style={{ flex: 1 }}>
                <ScrollableTabView
                    renderTabBar={() => <DefaultTabBar />}
                    tabBarUnderlineStyle={{ width: width / 2, backgroundColor: '#3d9ccc', height: 2 }}
                    tabBarBackgroundColor='#ffffff'
                    tabBarActiveTextColor='#3d9ccc'
                    tabBarInactiveTextColor='#868686'
                    tabBarTextStyle={{ fontSize: 14 }} >

                    <View tabLabel='公司概况' style={styles.left}><Companythree xzCompany={this.props.xzCompany} welfares={this.props.xzCompany.welfares} fields={this.props.xzCompany.fields}  navigation={this.props.navigation} /></View>
                    <View tabLabel='热招职位' style={{ flex: 1 }} ><Positionc companyId={this.props.xzCompany.companyId} pcount={this.props.xzCompany.pcount} fields={this.props.xzCompany.fields} navigation={this.props.navigation} /></View>
                </ScrollableTabView>
            </View>
        )
    }
}